$(document).ready(function() { if ($('window').width() < 780) { $('.toggleIcon').click(function() { $('.controlPanel-rootHolder').toggleClass('expanded'); }); } // Desktop - hover for menu items $('.controlPanel-rootItem, .controlPanel-rootLink, .controlPanel-rootLink img').hover(function() { $('.controlPanel-dropDown', this).stop().fadeIn(600); }, function() { $('.controlPanel-dropDown', this).stop().fadeOut(200); }); // Remove the link from the account icon $('a.acctLink').removeAttr('href'); // Create support link $('a.support').attr('href', 'http://support.bluesombrero.com'); // Create new features link $('a.features').attr('href', 'https://bluesombrero.zendesk.com/hc/en-us/articles/360000512592'); // Keep common menu item highlighted when hovering over the dropdown $('li.cp-common .acctDrop').hover(function(){ $('li.cp-common a').toggleClass('active') }); $('.AdminMenuBar .fa-bars').click(function(){ $('.fa-bars').hide(); $('.fa-times').show(); }); $('.AdminMenuBar .fa-times').click(function(){ $('.fa-times').hide(); $('.fa-bars').show(); }); // add a class to the main nav holder if the store link is active if ($('#Body .controlPanel-menuHolder nav ul li').hasClass('store')) { $('#Body .controlPanel-menuHolder nav').addClass('store'); } });